Skip to content

Notify instead of error when no elements on rank#1552

Merged
white238 merged 3 commits intodevelopfrom
watts24/Notify-instead-of-error-when-no-elements-on-rank
Mar 10, 2026
Merged

Notify instead of error when no elements on rank#1552
white238 merged 3 commits intodevelopfrom
watts24/Notify-instead-of-error-when-no-elements-on-rank

Conversation

@sethwatts
Copy link
Contributor

@sethwatts sethwatts commented Mar 10, 2026

In #1476, we added a SLIC_ERROR if the partitioning of the mfem::ParMesh/smith::Mesh left zero elements on any rank. However, per recent discussions with the MFEM team, the mfem::ParMesh and everything built on top of it (ParFiniteElementSpaces, ParGridFunctions, ...) should Just Work even when the partitioning results in no elements/dofs being owned by one or more ranks. We have confirmed that this is the case, and also that (at least in common usage), so does Smith.

In some cases, the user may not intend for such a partitioning, and may therefore want to kill the job and adjust the run size or mesh creation. However, in other use cases, particularly when there are meshes of different dimension/refinement on the same MPI communicator, this may be expected and intended. This PR therefore replaces the SLIC_ERROR with a SLIC_INFO message so that the user is notified about the partitioning, but otherwise code execution keeps moving.

Update: #1549 Removed the SLIC_ERROR calls entirely. That resolves the intent of this PR. If the SLIC_INFO is more than necessary, I'm happy to close without merging.

@sethwatts sethwatts self-assigned this Mar 10, 2026
@sethwatts
Copy link
Contributor Author

/style

@white238
Copy link
Member

/style

This functionality was disabled for reasons... you have engaged Chris Style Bot! Commit coming soon!

@sethwatts
Copy link
Contributor Author

I broke my build doing codevelop things and couldn't easily run styling myself. Thank you for jumping on it!

@sethwatts
Copy link
Contributor Author

/style

This functionality was disabled for reasons... you have engaged Chris Style Bot! Commit coming soon!

Shame... was going to try /deliver latte and perhaps a cranberry biscotti next 😄

Copy link
Member

@btalamini btalamini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I think it's a good idea if users are notified that there are empty ranks.

@white238 white238 merged commit 047bcef into develop Mar 10, 2026
10 checks passed
@white238 white238 deleted the watts24/Notify-instead-of-error-when-no-elements-on-rank branch March 10, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants